﻿{{define "configData"}}
<!-- 表格工具栏2 -->
<form class="layui-form toolbar">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">配置项标题:</label>
            <div class="layui-input-inline">
                <input name="title" class="layui-input" placeholder="输入配置项标题"/>
            </div>
        </div>
        <div class="layui-inline">&emsp;
            <button class="layui-btn icon-btn" lay-filter="configDataTbSearch" lay-submit>
                <i class="layui-icon">&#xe615;</i>搜索
            </button>
        </div>
    </div>
</form>
<!-- TABLE渲染区 -->
<table id="configDataTable" lay-filter="configDataTable"></table>

<!-- 表格操作列 -->
<script type="text/html" id="configDataTbBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<!-- 表单弹窗 -->
<script type="text/html" id="configDataEditDialog">
    <form id="configDataEditForm" lay-filter="configDataEditForm" class="layui-form model-form" style="padding-left: 10px;">
        <input name="id" id="id" type="hidden" value="{{.info.Id}}">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">配置标题：</label>
                <div class="layui-input-inline">
                    <input name="title" value="{{.info.Title}}" placeholder="请输入配置标题" class="layui-input"
                           lay-verType="tips" lay-verify="required" required/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">配置编码：</label>
                <div class="layui-input-inline">
                    <input name="code" value="{{.info.Code}}" placeholder="请输入配置编码" class="layui-input"
                           lay-verType="tips" lay-verify="required" required/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">配置类型：</label>
                <div class="layui-input-inline">
                    {{select "type|1|配置类型|name|id" .configTypeList .info.Type}}
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">配置值：</label>
                <div class="layui-input-inline">
                    <input name="value" value="{{.info.Value}}" placeholder="请输入配置值" class="layui-input"
                           lay-verType="tips" lay-verify="required" required/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">排序号：</label>
                <div class="layui-input-inline">
                    <input name="sort" value="{{.info.Sort}}" placeholder="请输入排序号" class="layui-input" type="number"
                           lay-verType="tips" lay-verify="required" required/>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">配置项：</label>
            <div class="layui-input-block">
                <textarea name="options" placeholder="请输入配置项" class="layui-textarea">{{.info.Options}}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注:</label>
            <div class="layui-input-block">
                <textarea name="note" placeholder="请输入备注" class="layui-textarea">{{.info.Note}}</textarea>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="configDataEditSubmit" lay-submit>保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
{{end}}